﻿using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Microsoft.WindowsMobile.Telephony;

namespace PhoneCall
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Phone p = new Phone();

            try
            {
                p.Talk(this.textBox1.Text.Trim());
            }
            catch (Exception ex)
            {
                MessageBox.Show(
                    String.Format("Error: {0}", ex.Message),
                    "Talk",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Hand,
                    MessageBoxDefaultButton.Button1);
            }
        }
    }
}